package edu.uci.ics.crawler4j.crawler;

public class CrawlerFactory_ClassInstance<T extends WebCrawler> implements CrawlerFactory<T> {

  private final Class<T> clazz;

  public CrawlerFactory_ClassInstance(final Class<T> c) {
    this.clazz = c;
  }

  @Override
  public T createCrawler() throws Exception {
    T crawler = clazz.newInstance();
    return crawler;
  }
}
